var Lottery_Rules = {

	"pl3zxfs": {
		showname: '直选',
		rulecode: 'pl3zxfs',
		realname: '[直选_复式]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: 850,
		fixed: 1,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3zxfs">' +
			'<dd><h5>百位</h5>' +
			'<ul class="sz-qiu"><li  id="pl3zxfs_f_0">0</li><li id="pl3zxfs_f_1">1</li><li id="pl3zxfs_f_2">2</li>' +
			'<li id="pl3zxfs_f_3">3</li><li id="pl3zxfs_f_4">4</li><li id="pl3zxfs_f_5">5</li><li id="pl3zxfs_f_6">6</li>' + 
			'<li id="pl3zxfs_f_7">7</li><li id="pl3zxfs_f_8">8</li><li id="pl3zxfs_f_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3zxfs_f_ful_0-9">全</li><li datascope="pl3zxfs_f_big_0-9">大</li><li datascope="pl3zxfs_f_sma_0-9">小</li>' + 
			'<li datascope="pl3zxfs_f_sin_0-9">单</li><li datascope="pl3zxfs_f_dou_0-9">双</li><li datascope="pl3zxfs_f_cle_0-9">清</li></ul></dd>' + 
			'<dd><h5>十位</h5>' + 
			'<ul class="sz-qiu"><li  id="pl3zxfs_s_0">0</li><li id="pl3zxfs_s_1">1</li><li id="pl3zxfs_s_2">2</li>' + 
			'<li id="pl3zxfs_s_3">3</li><li id="pl3zxfs_s_4">4</li><li id="pl3zxfs_s_5">5</li><li id="pl3zxfs_s_6">6</li>' + 
			'<li id="pl3zxfs_s_7">7</li><li id="pl3zxfs_s_8">8</li><li id="pl3zxfs_s_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3zxfs_s_ful_0-9">全</li><li datascope="pl3zxfs_s_big_0-9">大</li><li datascope="pl3zxfs_s_sma_0-9">小</li>' + 
			'<li datascope="pl3zxfs_s_sin_0-9">单</li><li datascope="pl3zxfs_s_dou_0-9">双</li><li datascope="pl3zxfs_s_cle_0-9">清</li></ul></dd>' + 
			'<dd><h5>个位</h5>' + 
			'<ul class="sz-qiu"><li  id="pl3zxfs_t_0">0</li><li id="pl3zxfs_t_1">1</li><li id="pl3zxfs_t_2">2</li>' + 
			'<li id="pl3zxfs_t_3">3</li><li id="pl3zxfs_t_4">4</li><li id="pl3zxfs_t_5">5</li><li id="pl3zxfs_t_6">6</li>' + 
			'<li id="pl3zxfs_t_7">7</li><li id="pl3zxfs_t_8">8</li><li id="pl3zxfs_t_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3zxfs_t_ful_0-9">全</li><li datascope="pl3zxfs_t_big_0-9">大</li><li datascope="pl3zxfs_t_sma_0-9">小</li>' + 
			'<li datascope="pl3zxfs_t_sin_0-9">单</li><li datascope="pl3zxfs_t_dou_0-9">双</li><li datascope="pl3zxfs_t_cle_0-9">清</li></ul></dd></dl>',
		bettips: '从百位、十位、个位中选择一个3位数号码组成一注，所选号码与开奖号码相同，且顺序一致，即为中奖。',
		betexample: '如：选择123，开奖号码为是123，即为中奖。',
		bethelp: '从百位、十位、个位中选择一个3位数号码组成一注，所选号码与开奖号码相同，且顺序一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['f'])+','+formatBall(balls['s'])+','+formatBall(balls['t']);
		},
		vali: function() {
			if (!way.get(this.rulecode + ".count.f") || !way.get(this.rulecode + ".count.s") || !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var ballF = way.get(this.rulecode + ".count.f");
				var ballS = way.get(this.rulecode + ".count.s");
				var ballT = way.get(this.rulecode + ".count.t");

				var itemcount = 0;


				if (ballF >= 1 && ballS >= 1 && ballT >= 1) {


					itemcount = ballF * ballS * ballT;

				}


				if (itemcount === 0) {

					itemcount = "0";
				}

				way.set("Lottery.itemcount", ""+itemcount);

				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["f", "s", "t"];
			for (var k = 0; k < 3; k++)
				for (var i = 0; i < 10; i++) {
					var item = $("#" + this.rulecode + "_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}


	},
	"pl3zxds": {
		showname: '单式',
		rulecode: 'pl3zxds',
		realname: '[直选_单式]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: 850,
		fixed: 1,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		bettips: '手动输入一个3位数号码组成一注，所选号码与开奖号码相同，且顺序一致，即为中奖。 ',
		betexample: '如：手动输入123，开奖号码为是123，即为中奖。',
		bethelp: '手动输入一个3位数号码组成一注，所选号码与开奖号码相同，且顺序一致，即为中奖。 ',
		textarea: {},
		vali: function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{3}\b/g;
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext: function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear: function() {
			way.set("Lottery.context", "");
		}
	},
	"pl3zux3": {
		showname: '组三',
		rulecode: 'pl3zux3',
		realname: '[组选_组三]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: -1,
		fixed: 3,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3zux3">' + 
			'<dd><h5>组三</h5>' + 
			'<ul class="sz-qiu"><li  id="pl3zux3_zu_0">0</li><li id="pl3zux3_zu_1">1</li><li id="pl3zux3_zu_2">2</li>' + 
			'<li id="pl3zux3_zu_3">3</li><li id="pl3zux3_zu_4">4</li><li id="pl3zux3_zu_5">5</li><li id="pl3zux3_zu_6">6</li>' + 
			'<li id="pl3zux3_zu_7">7</li><li id="pl3zux3_zu_8">8</li><li id="pl3zux3_zu_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3zux3_zu_ful_0-9">全</li><li datascope="pl3zux3_zu_big_0-9">大</li><li datascope="pl3zux3_zu_sma_0-9">小</li>' + 
			'<li datascope="pl3zux3_zu_sin_0-9">单</li><li datascope="pl3zux3_zu_dou_0-9">双</li><li datascope="pl3zux3_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips: '从0-9中任意选择2个数字组成两注，所选号码与开奖号码相同，顺序不限，即为中奖。',
		betexample: '如：选择12（展开为122,212,221 和 112、121、211），开奖号码为212 或 121，即为中奖。',
		bethelp: '从0-9中任意选择2个数字组成两注，所选号码与开奖号码相同，顺序不限，即为中奖。',
		vali: function() {
			if (!way.get(this.rulecode + ".count.zu") || way.get(this.rulecode + ".count.zu") < 2) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount - 1);
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["zu"];
			for (var k = 0; k < 1; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#pl3zux3_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},

	"pl3zux3dt": {
		showname: '组三',
		rulecode: 'pl3zux3dt',
		realname: '[组三_胆拖]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: -1,
		fixed: 3,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3zux3dt">' + 
			'<dd><h5>胆码</h5>' + 
			'<ul class="sz-qiu"><li id="pl3zux3dt_d_0">0</li><li id="pl3zux3dt_d_1">1</li><li id="pl3zux3dt_d_2">2</li>' + 
			'<li id="pl3zux3dt_d_3">3</li><li id="pl3zux3dt_d_4">4</li><li id="pl3zux3dt_d_5">5</li><li id="pl3zux3dt_d_6">6</li>' + 
			'<li id="pl3zux3dt_d_7">7</li><li id="pl3zux3dt_d_8">8</li><li id="pl3zux3dt_d_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3zux3dt_d_ful_0-9">全</li><li datascope="pl3zux3dt_d_big_0-9">大</li><li datascope="pl3zux3dt_d_sma_0-9">小</li>' + 
			'<li datascope="pl3zux3dt_d_sin_0-9">单</li><li datascope="pl3zux3dt_d_dou_0-9">双</li><li datascope="pl3zux3dt_d_cle_0-9">清</li></ul></dd>' + 
			'<dd><h5>拖码</h5>' + 
			'<ul class="sz-qiu"><li id="pl3zux3dt_t_0">0</li><li id="pl3zux3dt_t_1">1</li><li id="pl3zux3dt_t_2">2</li>' + 
			'<li id="pl3zux3dt_t_3">3</li><li id="pl3zux3dt_t_4">4</li><li id="pl3zux3dt_t_5">5</li><li id="pl3zux3dt_t_6">6</li>' + 
			'<li id="pl3zux3dt_t_7">7</li><li id="pl3zux3dt_t_8">8</li><li id="pl3zux3dt_t_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3zux3dt_t_ful_0-9">全</li><li datascope="pl3zux3dt_t_big_0-9">大</li><li datascope="pl3zux3dt_t_sma_0-9">小</li>' + 
			'<li datascope="pl3zux3dt_t_sin_0-9">单</li><li datascope="pl3zux3dt_t_dou_0-9">双</li><li datascope="pl3zux3dt_t_cle_0-9">清</li></ul></dd></dl>',
		bettips: '只能选择1个胆码，1个以上拖码，所选胆码＋拖码组成的单注号码，与组选三形态的开奖号码相同，即中奖。',
		betexample: '选择胆码 8，选择拖码 6，开奖号码为 8,8,6 或则8,6,6，即为中奖。',
		bethelp: '只能选择1个胆码，1个以上拖码，所选胆码＋拖码组成的单注号码，与组选三形态的开奖号码相同，即中奖。',
		textarea: {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali: function(e) {
			if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");

				if (d_balls && d_balls.length > 0 && t_balls && t_balls.length > 0) {
					var isfor = true;
					for (i = 0; isfor && i < d_balls.length; i++)
						if (d_balls[i])
							for (j = 0; j < t_balls.length; j++)
								if (t_balls[j] && t_balls[j] == d_balls[i]) {
									var ss = e.target.id.split("_");
									var balls = way.get(ss[0] + ".balls." + ss[1]);
									var count = way.get(ss[0] + ".count." + ss[1]);
									if ($(e.target).hasClass("cur")) {
										$(e.target).removeClass("cur");
										balls[eval(ss[2])] = "";
										way.set(ss[0] + ".count." + ss[1], count - 1);
									} else {
										$(e.target).addClass("cur");
										balls[eval(ss[2])] = ss[2];
										way.set(ss[0] + ".count." + ss[1], count + 1);
									}

									popTips('胆码拖码数字不能相同', "error");
									isfor = false;
									break;
								}
				}

				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				var itemcount = 0;

				if (d_count == 1 && t_count >= 1) {
					var op_flag = false;
					for (var oo = 0; oo < d_balls.length; oo++) {
						if (d_balls[oo] != undefined && d_balls[oo] != "") {
							for (var mm = 0; mm < t_balls.length; mm++) {
								if (t_balls[mm] != undefined && t_balls[mm] != "") {
									if (parseInt(t_balls[mm]) == parseInt(d_balls[oo])) {
										op_flag = true;
										break;
									}
								}
							}
						}

						if (op_flag == true) {
							break;
						}
					}

					if (op_flag == false) {
						if (d_count == 1) {
							if (t_count >= 1) {
								itemcount = t_count * 2;
							}
						}
					}
				}

				if (itemcount === 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear: function() {
			var ss = ["d", "t"];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#pl3zux3dt_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}

	},

	"pl3zux6": {
		showname: '组六',
		rulecode: 'pl3zux6',
		realname: '[组选_组六]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: -1,
		fixed: 6,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3zux6">' + 
			'<dd><h5>组六</h5>' + 
			'<ul class="sz-qiu"><li  id="pl3zux6_zu_0">0</li><li id="pl3zux6_zu_1">1</li><li id="pl3zux6_zu_2">2</li>' + 
			'<li id="pl3zux6_zu_3">3</li><li id="pl3zux6_zu_4">4</li><li id="pl3zux6_zu_5">5</li><li id="pl3zux6_zu_6">6</li>' + 
			'<li id="pl3zux6_zu_7">7</li><li id="pl3zux6_zu_8">8</li><li id="pl3zux6_zu_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3zux6_zu_ful_0-9">全</li><li datascope="pl3zux6_zu_big_0-9">大</li><li datascope="pl3zux6_zu_sma_0-9">小</li>' + 
			'<li datascope="pl3zux6_zu_sin_0-9">单</li><li datascope="pl3zux6_zu_dou_0-9">双</li><li datascope="pl3zux6_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips: '从0-9中任意选择3个号码组成一注，所选号码与开奖号码相同，顺序不限，即为中奖。',
		betexample: '如：选择123（展开为123,132,231,213,312,321），开奖号码为321，即为中奖。',
		bethelp: '从0-9中任意选择3个号码组成一注，所选号码与开奖号码相同，顺序不限，即为中奖。 ',
		vali: function() {
			if (!way.get(this.rulecode + ".count.zu") || way.get(this.rulecode + ".count.zu") < 3) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount - 1) * (itemcount - 2) / 6;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["zu"];
			for (var k = 0; k < 1; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#pl3zux6_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"pl3zux6dt": {
		showname: '组六',
		rulecode: 'pl3zux6dt',
		realname: '[组六_胆拖]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: -1,
		fixed: 6,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3zux6dt">' + 
			'<dd><h5>胆码</h5>' + 
			'<ul class="sz-qiu"><li id="pl3zux6dt_d_0">0</li><li id="pl3zux6dt_d_1">1</li><li id="pl3zux6dt_d_2">2</li>' + 
			'<li id="pl3zux6dt_d_3">3</li><li id="pl3zux6dt_d_4">4</li><li id="pl3zux6dt_d_5">5</li><li id="pl3zux6dt_d_6">6</li>' + 
			'<li id="pl3zux6dt_d_7">7</li><li id="pl3zux6dt_d_8">8</li><li id="pl3zux6dt_d_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3zux6dt_d_ful_0-9">全</li><li datascope="pl3zux6dt_d_big_0-9">大</li><li datascope="pl3zux6dt_d_sma_0-9">小</li>' + 
			'<li datascope="pl3zux6dt_d_sin_0-9">单</li><li datascope="pl3zux6dt_d_dou_0-9">双</li><li datascope="pl3zux6dt_d_cle_0-9">清</li></ul></dd>' + 
			'<dd><h5>拖码</h5>' + 
			'<ul class="sz-qiu"><li id="pl3zux6dt_t_0">0</li><li id="pl3zux6dt_t_1">1</li><li id="pl3zux6dt_t_2">2</li>' + 
			'<li id="pl3zux6dt_t_3">3</li><li id="pl3zux6dt_t_4">4</li><li id="pl3zux6dt_t_5">5</li><li id="pl3zux6dt_t_6">6</li>' + 
			'<li id="pl3zux6dt_t_7">7</li><li id="pl3zux6dt_t_8">8</li><li id="pl3zux6dt_t_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3zux6dt_t_ful_0-9">全</li><li datascope="pl3zux6dt_t_big_0-9">大</li><li datascope="pl3zux6dt_t_sma_0-9">小</li>' + 
			'<li datascope="pl3zux6dt_t_sin_0-9">单</li><li datascope="pl3zux6dt_t_dou_0-9">双</li><li datascope="pl3zux6dt_t_cle_0-9">清</li></ul></dd></dl>',
		bettips: '选择胆码拖码总数大于等于3(胆码个数最多为两个)组成的投注号码，投注的号码与组选六形态的开奖号码相同，即为中奖。',
		betexample: '选择胆码 8，选择拖码 6 7，开奖号码包含 8,7,6，即为中奖。',
		bethelp: '选择胆码拖码总数大于等于3(胆码个数最多为两个)组成的投注号码，投注的号码与组选六形态的开奖号码相同，即为中奖。',
		textarea: {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali: function(e) {
			if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");

				if (d_balls && d_balls.length > 0 && t_balls && t_balls.length > 0) {
					var isfor = true;
					for (i = 0; isfor && i < d_balls.length; i++)
						if (d_balls[i])
							for (j = 0; j < t_balls.length; j++)
								if (t_balls[j] && t_balls[j] == d_balls[i]) {
									var ss = e.target.id.split("_");
									var balls = way.get(ss[0] + ".balls." + ss[1]);
									var count = way.get(ss[0] + ".count." + ss[1]);
									if ($(e.target).hasClass("cur")) {
										$(e.target).removeClass("cur");
										balls[eval(ss[2])] = "";
										way.set(ss[0] + ".count." + ss[1], count - 1);
									} else {
										$(e.target).addClass("cur");
										balls[eval(ss[2])] = ss[2];
										way.set(ss[0] + ".count." + ss[1], count + 1);
									}

									popTips('胆码拖码数字不能相同', "error");
									isfor = false;
									break;
								}
				}

				var f_flag = false;

				for (var i = 0; i < d_balls.length; i++) {
					if (d_balls[i] != undefined && d_balls[i] != "") {
						for (var g = 0; g < t_balls.length; g++) {
							if (t_balls[g] != undefined && t_balls[g] != "") {
								if (parseInt(d_balls[i]) == parseInt(t_balls[g])) {
									f_flag = true;
									break;
								}
							}
						}
					}
					if (f_flag) {
						break;
					}
				}

				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				var itemcount = 0;

				if (f_flag === false) {
					if (d_count <= 2 && d_count > 0) {
						if (d_count == 1) {
							if (t_count >= 2) {
								itemcount = t_count * (t_count - 1) / 2;
							}
						} else if (d_count == 2) {
							if (t_count >= 1) {
								itemcount = t_count;
							}
						}
					}
				}

				if (itemcount === 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear: function() {
			var ss = ["d", "t"];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#pl3zux6dt_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}

	},
	"pl3zuxhh": {
		showname: '混合',
		rulecode: 'pl3zuxhh',
		realname: '[组选_混合]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: -1,
		fixed: 3,
		s_fixed: 6,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		bettips: '手动输入购买号码，3个数字为一注，开奖号码符合组三或组六均为中奖。',
		betexample: '选择123、455，开奖号码为321即中组六奖，开奖号码为545即中组三奖。',
		bethelp: '手动输入购买号码，3个数字为一注，开奖号码符合组三或组六均为中奖。 ',
		textarea: {},
		vali: function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{3}\b/g;
				var sszz = util_unique(v, reg, 1, true, true);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext: function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear: function() {
			way.set("Lottery.context", "");
		}
	},
	"pl3qx2fs": {
		showname: '复式',
		rulecode: 'pl3qx2fs',
		realname: '[前二_复式]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: 85,
		fixed: 10,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3qx2fs"><dd><h5>百位</h5>' + 
				'<ul class="sz-qiu"><li  id="pl3qx2fs_w_0">0</li><li id="pl3qx2fs_w_1">1</li><li id="pl3qx2fs_w_2">2</li>' + 
				'<li id="pl3qx2fs_w_3">3</li><li id="pl3qx2fs_w_4">4</li><li id="pl3qx2fs_w_5">5</li><li id="pl3qx2fs_w_6">6</li>' + 
				'<li id="pl3qx2fs_w_7">7</li><li id="pl3qx2fs_w_8">8</li><li id="pl3qx2fs_w_9">9</li></ul>' + 
				'<ul class="gongn"><li datascope="pl3qx2fs_w_ful_0-9">全</li><li datascope="pl3qx2fs_w_big_0-9">大</li><li datascope="pl3qx2fs_w_sma_0-9">小</li>' + 
				'<li datascope="pl3qx2fs_w_sin_0-9">单</li><li datascope="pl3qx2fs_w_dou_0-9">双</li><li datascope="pl3qx2fs_w_cle_0-9">清</li></ul></dd>' + 
				'<dd><h5>十位</h5>' + 
				'<ul class="sz-qiu"><li  id="pl3qx2fs_q_0">0</li><li id="pl3qx2fs_q_1">1</li><li id="pl3qx2fs_q_2">2</li>' + 
				'<li id="pl3qx2fs_q_3">3</li><li id="pl3qx2fs_q_4">4</li><li id="pl3qx2fs_q_5">5</li><li id="pl3qx2fs_q_6">6</li>' + 
				'<li id="pl3qx2fs_q_7">7</li><li id="pl3qx2fs_q_8">8</li><li id="pl3qx2fs_q_9">9</li></ul>' + 
				'<ul class="gongn"><li datascope="pl3qx2fs_q_ful_0-9">全</li><li datascope="pl3qx2fs_q_big_0-9">大</li><li datascope="pl3qx2fs_q_sma_0-9">小</li>' + 
				'<li datascope="pl3qx2fs_q_sin_0-9">单</li><li datascope="pl3qx2fs_q_dou_0-9">双</li><li datascope="pl3qx2fs_q_cle_0-9">清</li></ul></dd></dl>',
		bettips: '从百位和十位上至少各选1个号码，所选号码与开奖号码的百位、十位相同，且顺序一致，即为中奖。',
		betexample: '投注方案：23*；开奖号码：23*',
		bethelp: '从百位和十位上至少各选1个号码，所选号码与开奖号码的百位、十位相同，且顺序一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['w'])+','+formatBall(balls['q']);
		},
		vali: function() {
			if (!way.get(this.rulecode + ".count.w") || !way.get(this.rulecode + ".count.q")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.w") * way.get(this.rulecode + ".count.q");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["w", "q"];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#pl3qx2fs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"pl3qx2ds": {
		showname: '单式',
		rulecode: 'pl3qx2ds',
		realname: '[前二_单式]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: 85,
		fixed: 10,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		bettips: '手动输入一个2位数号码组成一注，所选号码与开奖号码的百位、十位相同，且顺序一致，即为中奖。',
		betexample: '投注方案：23*； 开奖号码：23*，即中奖',
		bethelp: '手动输入一个2位数号码组成一注，所选号码与开奖号码的百位、十位相同，且顺序一致，即为中奖。',
		textarea: {},
		vali: function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b([0-9]{2})\b/g;
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext: function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear: function() {
			way.set("Lottery.context", "");
		}
	},
	"pl3hx2fs": {
		showname: '复式',
		rulecode: 'pl3hx2fs',
		realname: '[后二_复式]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: 85,
		fixed: 10,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3hx2fs">' + 
			'<dd><h5>十位</h5>' + 
			'<ul class="sz-qiu"><li  id="pl3hx2fs_s_0">0</li><li id="pl3hx2fs_s_1">1</li><li id="pl3hx2fs_s_2">2</li>' + 
			'<li id="pl3hx2fs_s_3">3</li><li id="pl3hx2fs_s_4">4</li><li id="pl3hx2fs_s_5">5</li><li id="pl3hx2fs_s_6">6</li>' + 
			'<li id="pl3hx2fs_s_7">7</li><li id="pl3hx2fs_s_8">8</li><li id="pl3hx2fs_s_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3hx2fs_s_ful_0-9">全</li><li datascope="pl3hx2fs_s_big_0-9">大</li><li datascope="pl3hx2fs_s_sma_0-9">小</li>' + 
			'<li datascope="pl3hx2fs_s_sin_0-9">单</li><li datascope="pl3hx2fs_s_dou_0-9">双</li><li datascope="pl3hx2fs_s_cle_0-9">清</li></ul></dd>' + 
			'<dd><h5>个位</h5>' + 
			'<ul class="sz-qiu"><li  id="pl3hx2fs_g_0">0</li><li id="pl3hx2fs_g_1">1</li><li id="pl3hx2fs_g_2">2</li>' + 
			'<li id="pl3hx2fs_g_3">3</li><li id="pl3hx2fs_g_4">4</li><li id="pl3hx2fs_g_5">5</li><li id="pl3hx2fs_g_6">6</li>' + 
			'<li id="pl3hx2fs_g_7">7</li><li id="pl3hx2fs_g_8">8</li><li id="pl3hx2fs_g_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3hx2fs_g_ful_0-9">全</li><li datascope="pl3hx2fs_g_big_0-9">大</li><li datascope="pl3hx2fs_g_sma_0-9">小</li>' + 
			'<li datascope="pl3hx2fs_g_sin_0-9">单</li><li datascope="pl3hx2fs_g_dou_0-9">双</li><li datascope="pl3hx2fs_g_cle_0-9">清</li></ul></dd></dl>',
		bettips: '从十位和个位上至少各选1个号码，所选号码与开奖号码的十位、个位相同，且顺序一致，即为中奖',
		betexample: '投注方案：*23；开奖号码：*23',
		bethelp: '从十位和个位上至少各选1个号码，所选号码与开奖号码的十位、个位相同，且顺序一致，即为中奖',
		formatBalls : function(balls) {
			return formatBall(balls['s'])+','+formatBall(balls['g']);
		},
		vali: function() {
			if (!way.get(this.rulecode + ".count.s") || !way.get(this.rulecode + ".count.g")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.s") * way.get(this.rulecode + ".count.g");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["s", "g"];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#pl3hx2fs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"pl3hx2ds": {
		showname: '单式',
		rulecode: 'pl3hx2ds',
		realname: '[后二_单式]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: 85,
		fixed: 10,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		bettips: '手动输入一个2位数号码组成一注，所选号码与开奖号码的十位、个位相同，且顺序一致，即为中奖。',
		betexample: '投注方案：*23； 开奖号码：*23，即中奖',
		bethelp: '手动输入一个2位数号码组成一注，所选号码与开奖号码的十位、个位相同，且顺序一致，即为中奖。',
		textarea: {},
		vali: function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b([0-9]{2})\b/g;
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext: function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear: function() {
			way.set("Lottery.context", "");
		}
	},
	"pl3bdw": {
		showname: '不定位',
		rulecode: 'pl3bdw',
		realname: '[不定位_不定位]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: -1,
		obtainMaxBetNumberPerOrder: function(currentRecodNumber) {

			var max_p_n = 3;

			if (currentRecodNumber >= max_p_n) {

				return max_p_n;
			} else {

				return currentRecodNumber;
			}


		},
		minMode: 1820,
		startPrice: 6.6,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3bdw">' + 
			'<dd><h5>不定位</h5>' + 
			'<ul class="sz-qiu"><li  id="pl3bdw_zu_0">0</li><li id="pl3bdw_zu_1">1</li><li id="pl3bdw_zu_2">2</li>' + 
			'<li id="pl3bdw_zu_3">3</li><li id="pl3bdw_zu_4">4</li><li id="pl3bdw_zu_5">5</li><li id="pl3bdw_zu_6">6</li>' + 
			'<li id="pl3bdw_zu_7">7</li><li id="pl3bdw_zu_8">8</li><li id="pl3bdw_zu_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3bdw_zu_ful_0-9">全</li><li datascope="pl3bdw_zu_big_0-9">大</li><li datascope="pl3bdw_zu_sma_0-9">小</li>' + 
			'<li datascope="pl3bdw_zu_sin_0-9">单</li><li datascope="pl3bdw_zu_dou_0-9">双</li><li datascope="pl3bdw_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips: '从0-9中选择1个号码，每注由1个号码组成，只要开奖结果中包含所选号码，即为中奖。',
		betexample: '如：选择一码不定位4，开出4**、*4*、**4，即为中奖。',
		bethelp: '从0-9中选择1个号码，每注由1个号码组成，只要开奖结果中包含所选号码，即为中奖。',
		vali: function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["zu"];
			for (var k = 0; k < 1; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#pl3bdw_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"pl3dwd1q": {
		showname: '前一',
		rulecode: 'pl3dwd1q',
		realname: '[定位胆_前一]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: 9,
		fixed: 100,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3dwd1q">' + 
			'<dd><h5>前一</h5>' + 
			'<ul class="sz-qiu"><li  id="pl3dwd1q_zu_0">0</li><li id="pl3dwd1q_zu_1">1</li><li id="pl3dwd1q_zu_2">2</li>' + 
			'<li id="pl3dwd1q_zu_3">3</li><li id="pl3dwd1q_zu_4">4</li><li id="pl3dwd1q_zu_5">5</li><li id="pl3dwd1q_zu_6">6</li>' + 
			'<li id="pl3dwd1q_zu_7">7</li><li id="pl3dwd1q_zu_8">8</li><li id="pl3dwd1q_zu_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3dwd1q_zu_ful_0-9">全</li><li datascope="pl3dwd1q_zu_big_0-9">大</li><li datascope="pl3dwd1q_zu_sma_0-9">小</li>' + 
			'<li datascope="pl3dwd1q_zu_sin_0-9">单</li><li datascope="pl3dwd1q_zu_dou_0-9">双</li><li datascope="pl3dwd1q_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips: '选择1个号码，所选号码与百位上的开奖号码一致，即为中奖。',
		betexample: '选择 1，开奖号码为1**即为中奖',
		bethelp: '选择1个号码，所选号码与百位上的开奖号码一致，即为中奖。',
		vali: function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var v_w = 0;

				if (way.get(this.rulecode + ".count.zu")) v_w = way.get(this.rulecode + ".count.zu");
				var itemcount = v_w;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["zu"];
			for (var k = 0; k < 1; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#pl3dwd1q_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"pl3dwd1h": {
		showname: '后一',
		rulecode: 'pl3dwd1h',
		realname: '[定位胆_后一]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: 9,
		fixed: 100,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3dwd1h">' + 
			'<dd><h5>后一</h5>' + 
			'<ul class="sz-qiu"><li  id="pl3dwd1h_zu_0">0</li><li id="pl3dwd1h_zu_1">1</li><li id="pl3dwd1h_zu_2">2</li>' + 
			'<li id="pl3dwd1h_zu_3">3</li><li id="pl3dwd1h_zu_4">4</li><li id="pl3dwd1h_zu_5">5</li><li id="pl3dwd1h_zu_6">6</li>' + 
			'<li id="pl3dwd1h_zu_7">7</li><li id="pl3dwd1h_zu_8">8</li><li id="pl3dwd1h_zu_9">9</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3dwd1h_zu_ful_0-9">全</li><li datascope="pl3dwd1h_zu_big_0-9">大</li><li datascope="pl3dwd1h_zu_sma_0-9">小</li>' + 
			'<li datascope="pl3dwd1h_zu_sin_0-9">单</li><li datascope="pl3dwd1h_zu_dou_0-9">双</li><li datascope="pl3dwd1h_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips: '选择1个号码，所选号码与个位上的开奖号码一致，即为中奖。 ',
		betexample: '如：选3，开奖号码为**3，即为中奖。',
		bethelp: '选择1个号码，所选号码与个位上的开奖号码一致，即为中奖。',
		vali: function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var v_s = 0;

				if (way.get(this.rulecode + ".count.zu")) v_s = way.get(this.rulecode + ".count.zu");

				var itemcount = v_s;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["zu"];
			for (var k = 0; k < 1; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#pl3dwd1h_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"pl3hzzx": {
		showname: '和值',
		rulecode: 'pl3hzzx',
		realname: '[和值_直选]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: -1,
		fixed: 1,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3hzzx">' + 
			'<dd><h5>直选</h5>' + 
			'<ul class="sz-qiu"><li  id="pl3hzzx_zu_00">0</li><li id="pl3hzzx_zu_01">1</li><li id="pl3hzzx_zu_02">2</li>' + 
			'<li id="pl3hzzx_zu_03">3</li><li id="pl3hzzx_zu_04">4</li><li id="pl3hzzx_zu_05">5</li><li id="pl3hzzx_zu_06">6</li>' + 
			'<li id="pl3hzzx_zu_07">7</li><li id="pl3hzzx_zu_08">8</li><li id="pl3hzzx_zu_09">9</li><li id="pl3hzzx_zu_10">10</li>' + 
			'<li id="pl3hzzx_zu_11">11</li><li id="pl3hzzx_zu_12">12</li><li id="pl3hzzx_zu_13">13</li><li id="pl3hzzx_zu_14">14</li>' + 
			'<li id="pl3hzzx_zu_15">15</li><li id="pl3hzzx_zu_16">16</li><li id="pl3hzzx_zu_17">17</li><li id="pl3hzzx_zu_18">18</li>' + 
			'<li id="pl3hzzx_zu_19">19</li><li id="pl3hzzx_zu_20">20</li><li id="pl3hzzx_zu_21">21</li><li id="pl3hzzx_zu_22">22</li>' + 
			'<li id="pl3hzzx_zu_23">23</li><li id="pl3hzzx_zu_24">24</li><li id="pl3hzzx_zu_25">25</li><li id="pl3hzzx_zu_26">26</li>' + 
			'<li id="pl3hzzx_zu_27">27</li></ul>' + 
			'<ul class="gongn"><li datascope="pl3hzzx_zu_ful_0-27">全</li><li datascope="pl3hzzx_zu_big_0-27">大</li><li datascope="pl3hzzx_zu_sma_0-27">小</li>' + 
			'<li datascope="pl3hzzx_zu_sin_0-27">单</li><li datascope="pl3hzzx_zu_dou_0-27">双</li><li datascope="pl3hzzx_zu_cle_0-27">清</li></ul></dd></dl>',
		bettips: '0-27之间至少选择1个号码，投注号码与开奖号码的三个号码之和相同即中。',
		betexample: '如：选择6，开奖号码为321，即为中奖。',
		bethelp: '0-27之间至少选择1个号码，投注号码与开奖号码的三个号码之和相同即中。',
		vali: function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var selected_zu_ball_array = way.get(this.rulecode + ".balls.zu");

				var itemcount = 0;

				for (var i = 0; i <= 9; i++) {

					for (var j = 0; j <= 9; j++) {

						for (var k = 0; k <= 9; k++) {

							for (var d = 0; d < selected_zu_ball_array.length; d++) {

								if (selected_zu_ball_array[d] != undefined && selected_zu_ball_array[d] != "") {

									if (i + j + k == parseInt(selected_zu_ball_array[d])) {

										itemcount++;
									}

								}

							}

						}

					}

				}

				if (itemcount === 0) {

					itemcount = "0";
				}

				way.set("Lottery.itemcount", ""+itemcount);

				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;

				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["zu"];
			for (var k = 0; k < 1; k++)
				for (var i = 0; i <= 27; i++) {
					var item = $("#pl3hzzx_" + ss[k] + "_" + (i < 10 ? ("0" + i) : i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"pl3hzzux3": {
		showname: '和值',
		rulecode: 'pl3hzzux3',
		realname: '[和值_组三]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: -1,
		fixed: 3,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3hzzux3">' + 
			'<dd><h5>组三</h5>' + 
			'<ul class="sz-qiu"><li id="pl3hzzux3_zu_01">1</li><li id="pl3hzzux3_zu_02">2</li>' + 
			'<li id="pl3hzzux3_zu_03">3</li><li id="pl3hzzux3_zu_04">4</li><li id="pl3hzzux3_zu_05">5</li><li id="pl3hzzux3_zu_06">6</li>' + 
			'<li id="pl3hzzux3_zu_07">7</li><li id="pl3hzzux3_zu_08">8</li><li id="pl3hzzux3_zu_09">9</li><li id="pl3hzzux3_zu_10">10</li>' + 
			'<li id="pl3hzzux3_zu_11">11</li><li id="pl3hzzux3_zu_12">12</li><li id="pl3hzzux3_zu_13">13</li><li id="pl3hzzux3_zu_14">14</li>' + 
			'<li id="pl3hzzux3_zu_15">15</li><li id="pl3hzzux3_zu_16">16</li><li id="pl3hzzux3_zu_17">17</li><li id="pl3hzzux3_zu_18">18</li>' + 
			'<li id="pl3hzzux3_zu_19">19</li><li id="pl3hzzux3_zu_20">20</li><li id="pl3hzzux3_zu_21">21</li><li id="pl3hzzux3_zu_22">22</li>' + 
			'<li id="pl3hzzux3_zu_23">23</li><li id="pl3hzzux3_zu_24">24</li><li id="pl3hzzux3_zu_25">25</li><li id="pl3hzzux3_zu_26">26</li>' + 
			'</ul>' + 
			'<ul class="gongn"><li datascope="pl3hzzux3_zu_ful_0-27">全</li><li datascope="pl3hzzux3_zu_big_0-27">大</li><li datascope="pl3hzzux3_zu_sma_0-27">小</li>' + 
			'<li datascope="pl3hzzux3_zu_sin_0-27">单</li><li datascope="pl3hzzux3_zu_dou_0-27">双</li><li datascope="pl3hzzux3_zu_cle_0-27">清</li></ul></dd></dl>',
		bettips: '1-26之间至少选择1个号码，投注号码是组三形式，且和值相同即中。',
		betexample: '如：选择5，开奖号码为221，即为中奖。',
		bethelp: '1-26之间至少选择1个号码，投注号码是组三形式，且和值相同即中。',
		vali: function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var selected_zu_ball_array = way.get(this.rulecode + ".balls.zu");

				var itemcount = 0;

				for (var i = 0; i <= 9; i++) {

					for (var j = 0; j <= 9; j++) {

						for (var k = 0; k <= 9; k++) {

							for (var d = 0; d < selected_zu_ball_array.length; d++) {

								if (selected_zu_ball_array[d] != undefined && selected_zu_ball_array[d] != "") {

									if (i + j + k == parseInt(selected_zu_ball_array[d])) {

										if ((i == j && j != k) || (i == k && k != j) || (j == k && k != i)) {

											itemcount++;
										}
									}

								}

							}

						}

					}

				}

				if (itemcount == 0) {

					itemcount = "0";
				} else {

					itemcount = itemcount / 3;
				}

				way.set("Lottery.itemcount", ""+itemcount);

				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;

				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["zu"];
			for (var k = 0; k < 1; k++)
				for (var i = 1; i <= 26; i++) {
					var item = $("#pl3hzzux3_" + ss[k] + "_" + (i < 10 ? ("0" + i) : i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"pl3hzzux6": {
		showname: '和值',
		rulecode: 'pl3hzzux6',
		realname: '[和值_组六]',
		maxMultiplePerOrder: -1,

		maxPrize: -1,
		maxRecord: -1,
		fixed: 6,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3hzzux6">' + 
			'<dd><h5>组六</h5>' + 
			'<ul class="sz-qiu">' + 
			'<li id="pl3hzzux6_zu_03">3</li><li id="pl3hzzux6_zu_04">4</li><li id="pl3hzzux6_zu_05">5</li><li id="pl3hzzux6_zu_06">6</li>' + 
			'<li id="pl3hzzux6_zu_07">7</li><li id="pl3hzzux6_zu_08">8</li><li id="pl3hzzux6_zu_09">9</li><li id="pl3hzzux6_zu_10">10</li>' + 
			'<li id="pl3hzzux6_zu_11">11</li><li id="pl3hzzux6_zu_12">12</li><li id="pl3hzzux6_zu_13">13</li><li id="pl3hzzux6_zu_14">14</li>' + 
			'<li id="pl3hzzux6_zu_15">15</li><li id="pl3hzzux6_zu_16">16</li><li id="pl3hzzux6_zu_17">17</li><li id="pl3hzzux6_zu_18">18</li>' + 
			'<li id="pl3hzzux6_zu_19">19</li><li id="pl3hzzux6_zu_20">20</li><li id="pl3hzzux6_zu_21">21</li><li id="pl3hzzux6_zu_22">22</li>' + 
			'<li id="pl3hzzux6_zu_23">23</li><li id="pl3hzzux6_zu_24">24</li>' + 
			'</ul>' + 
			'<ul class="gongn"><li datascope="pl3hzzux6_zu_ful_3-24">全</li><li datascope="pl3hzzux6_zu_big_3-24">大</li><li datascope="pl3hzzux6_zu_sma_3-24">小</li>' + 
			'<li datascope="pl3hzzux6_zu_sin_3-24">单</li><li datascope="pl3hzzux6_zu_dou_3-24">双</li><li datascope="pl3hzzux6_zu_cle_3-24">清</li></ul></dd></dl>',
		bettips: '3-24之间至少选择1个号码，投注号码是组六形式，且和值相同即中。',
		betexample: '如：选择6，开奖号码为321，即为中奖。',
		bethelp: '3-24之间至少选择1个号码，投注号码是组六形式，且和值相同即中。',
		vali: function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var selected_zu_ball_array = way.get(this.rulecode + ".balls.zu");

				var itemcount = 0;

				for (var i = 0; i <= 9; i++) {

					for (var j = 0; j <= 9; j++) {

						for (var k = 0; k <= 9; k++) {

							for (var d = 0; d < selected_zu_ball_array.length; d++) {


								if (selected_zu_ball_array[d] != undefined && selected_zu_ball_array[d] != "") {


									if (i + j + k == parseInt(selected_zu_ball_array[d])) {

										if (i != j && j != k && k != i) {

											itemcount++;
										}
									}

								}

							}

						}

					}

				}

				if (itemcount == 0) {

					itemcount = "0";
				} else {

					itemcount = itemcount / 6;
				}

				way.set("Lottery.itemcount", ""+itemcount);

				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;

				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["zu"];
			for (var k = 0; k < 1; k++)
				for (var i = 3; i <= 24; i++) {
					var item = $("#pl3hzzux6_" + ss[k] + "_" + (i < 10 ? ("0" + i) : i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"pl3hzdx": {
		showname: '和值',
		rulecode: 'pl3hzdx',
		realname: '[和值_大小]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: -1,
		startPrice: 6,
		minMode: 1820,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3hzdx">' + 
			'<dd><h5>大小</h5>' + 
			'<ul class="sz-qiu">' + 
			'<li id="pl3hzdx_zu_0">小</li><li id="pl3hzdx_zu_1">大</li>' + 
			'</ul></dd></dl>',
		bettips: '开奖号码相加之和在19～27之间即为大，在0～8之间即为小。',
		betexample: '如：选择小，开奖号码为321，即为中奖。',
		bethelp: '开奖号码相加之和在19～27之间即为大，在0～8之间即为小。',
		replaceCode: function(codes) {
			codes = codes.replace(new RegExp('0', 'g'), "小");
			codes = codes.replace(new RegExp('1', 'g'), "大");
			return codes;
		},
		vali: function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");

				way.set("Lottery.itemcount", ""+itemcount);

				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["zu"];
			for (var k = 0; k < 1; k++)
				for (var i = 0; i <= 1; i++) {
					var item = $("#pl3hzdx_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"pl3qwjo": {
		showname: '趣味',
		rulecode: 'pl3qwjo',
		realname: '[趣味_奇偶]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: -1,
		startPrice: 15.4,
		minMode: 1850,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3qwjo">' + 
			'<dd><h5>奇偶</h5>' + 
			'<ul class="sz-qiu">' + 
			'<li id="pl3qwjo_zu_0">奇</li><li id="pl3qwjo_zu_1">偶</li>' + 
			'</ul></dd></dl>',
		bettips: '开奖号码全部为奇数即为奇(例如：135)，全部为偶数即为偶(例如：246)。',
		betexample: '如：选择奇，开奖号码为351，即为中奖。',
		bethelp: '开奖号码全部为奇数即为奇(例如：135)，全部为偶数即为偶(例如：246)。',
		replaceCode: function(codes) {
			codes = codes.replace(new RegExp('0', 'g'), "奇");
			codes = codes.replace(new RegExp('1', 'g'), "偶");
			return codes;
		},
		vali: function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");

				way.set("Lottery.itemcount", ""+itemcount);

				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;

				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["zu"];
			for (var k = 0; k < 1; k++)
				for (var i = 0; i <= 1; i++) {
					var item = $("#pl3qwjo_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"pl3qwtlj": {
		showname: '趣味',
		rulecode: 'pl3qwtlj',
		realname: '[趣味_拖拉机]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: -1,
		startPrice: 124,
		minMode: 1850,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="pl3qwtlj">' + 
			'<dd><h5>拖拉机</h5>' + 
			'<ul class="sz-qiu">' + 
			'<li id="pl3qwtlj_zu_0">全</li>' + 
			'</ul></dd></dl>',
		bettips: '开奖号码的三个号码为以升序或降序连续排列的号码(890、098、901、109除外)',
		betexample: '如：选择拖拉机，开奖号码为321，即为中奖。',
		bethelp: '开奖号码的三个号码为以升序或降序连续排列的号码(890、098、901、109除外)',
		replaceCode: function(codes) {
			codes = codes.replace(new RegExp('0', 'g'), "全");
			return codes;
		},
		vali: function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");


				way.set("Lottery.itemcount", ""+itemcount);

				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;

				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["zu"];
			for (var k = 0; k < 1; k++)
				for (var i = 0; i < 1; i++) {
					var item = $("#pl3qwtlj_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	}


};